namespace Collection.Entities {
    	using System;
    	
    	
    	/// <summary>
    	/// 表名：LotteryNumbers 主键列：Id
    	/// </summary>
    	[SerializableAttribute()]
    	public partial class _LotteryNumber : MySoft.Data.Entity {
    		
    		protected Int64 _Id;
    		
    		protected Int64 _BriefingId;
    		
    		protected Int16 _Location;
    		
    		protected Int16 _Number;
    		
    		/// <summary>
    		/// 每只彩票的开奖号码信息
    		/// </summary>
    		public Int64 Id {
    			get {
    				return this._Id;
    			}
    			set {
    				this.OnPropertyValueChange(_.Id, _Id, value);
    				this._Id = value;
    			}
    		}
    		
    		public Int64 BulletinId {
    			get {
    				return this._BriefingId;
    			}
    			set {
    				this.OnPropertyValueChange(_.BriefingId, _BriefingId, value);
    				this._BriefingId = value;
    			}
    		}
    		
    		/// <summary>
    		/// 号码位置（从1开始到彩票号码长度的位置）
    		/// </summary>
    		public Int16 Location {
    			get {
    				return this._Location;
    			}
    			set {
    				this.OnPropertyValueChange(_.Location, _Location, value);
    				this._Location = value;
    			}
    		}
    		
    		public Int16 Number {
    			get {
    				return this._Number;
    			}
    			set {
    				this.OnPropertyValueChange(_.Number, _Number, value);
    				this._Number = value;
    			}
    		}
    		
    		/// <summary>
    		/// 获取实体对应的表名
    		/// </summary>
    		protected override MySoft.Data.Table GetTable() {
    			return new MySoft.Data.Table<_LotteryNumber>("LotteryNumber");
    		}
    		
    		/// <summary>
    		/// 获取实体中的标识列
    		/// </summary>
    		protected override MySoft.Data.Field GetIdentityField() {
    			return _.Id;
    		}
    		
    		/// <summary>
    		/// 获取实体中的主键列
    		/// </summary>
    		protected override MySoft.Data.Field[] GetPrimaryKeyFields() {
    			return new MySoft.Data.Field[] {
    					_.Id};
    		}
    		
    		/// <summary>
    		/// 获取列信息
    		/// </summary>
    		protected override MySoft.Data.Field[] GetFields() {
    			return new MySoft.Data.Field[] {
    					_.Id,
    					_.BriefingId,
    					_.Location,
    					_.Number};
    		}
    		
    		/// <summary>
    		/// 获取列数据
    		/// </summary>
    		protected override object[] GetValues() {
    			return new object[] {
    					this._Id,
    					this._BriefingId,
    					this._Location,
    					this._Number};
    		}
    		
    		/// <summary>
    		/// 给当前实体赋值
    		/// </summary>
    		protected override void SetValues(MySoft.Data.IRowReader reader) {
    			if ((false == reader.IsDBNull(_.Id))) {
    				this._Id = reader.GetInt64(_.Id);
    			}
    			if ((false == reader.IsDBNull(_.BriefingId))) {
    				this._BriefingId = reader.GetInt32(_.BriefingId);
    			}
    			if ((false == reader.IsDBNull(_.Location))) {
    				this._Location = reader.GetInt16(_.Location);
    			}
    			if ((false == reader.IsDBNull(_.Number))) {
    				this._Number = reader.GetInt16(_.Number);
    			}
    		}
    		
    		public override int GetHashCode() {
    			return base.GetHashCode();
    		}
    		
    		public override bool Equals(object obj) {
    			if ((obj == null)) {
    				return false;
    			}
    			if ((false == typeof(_LotteryNumber).IsAssignableFrom(obj.GetType()))) {
    				return false;
    			}
    			if ((((object)(this)) == ((object)(obj)))) {
    				return true;
    			}
    			return false;
    		}
    		
    		public class _ {
    			
    			/// <summary>
    			/// 表示选择所有列，与*等同
    			/// </summary>
    			public static MySoft.Data.AllField All = new MySoft.Data.AllField<_LotteryNumber>();
    			
    			/// <summary>
    			/// 每只彩票的开奖号码信息 - 字段名：Id - 数据类型：Int64
    			/// </summary>
    			public static MySoft.Data.Field Id = new MySoft.Data.Field<_LotteryNumber>("Id");
    			
    			/// <summary>
    			/// 字段名：BulletinId - 数据类型：Int32
    			/// </summary>
                public static MySoft.Data.Field BriefingId = new MySoft.Data.Field<_LotteryNumber>("BriefingId");
    			
    			/// <summary>
    			/// 号码位置（从1开始到彩票号码长度的位置） - 字段名：Location - 数据类型：Int16
    			/// </summary>
    			public static MySoft.Data.Field Location = new MySoft.Data.Field<_LotteryNumber>("Location");
    			
    			/// <summary>
    			/// 字段名：Number - 数据类型：Int16
    			/// </summary>
    			public static MySoft.Data.Field Number = new MySoft.Data.Field<_LotteryNumber>("Number");
    		}
    	}
    }
    